<%--
  Created by IntelliJ IDEA.
  User: dream
  Date: 14-4-4
  Time: 下午11:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../header.jsp"%>
<html>
<head>
    <title></title>
</head>
<body>
<div class="easyui-panel form_container" data-options="fit:true,border:false">
    <form id="perRole_form" class="input_form">
        <input name="id" type="hidden" value="${perRole.id}"/>
        <table class="input_table">
            <tr class="tr_dark">
                <td class="td_lable">名称：</td>
                <td class="td_input"><input type="text" name="name" value="${perRole.name}"></td>
            </tr>
            <tr class="tr_light">
                <td class="td_lable">备注：</td>
                <td class="td_input"><textarea name="description" cols="40" rows="4">${perRole.description}</textarea>
                </td>
            </tr>
        </table>
        <div style="text-align:right;padding:10px">
            <a href="javascript:void(0)" class="easyui-linkbutton save_button" id="perRole_save_button">提交</a>
            <a href="javascript:void(0)" class="easyui-linkbutton reset_button" id="perRole_reset_button">重置</a>
        </div>
    </form>
</div>
<script>
    var formObj = $('#perRole_form');
    $(function () {
        var conditions = {
            name: {required: true},
            description: {}
        };
        $.initFormConditions(formObj, conditions);
    });

    $('#perRole_save_button').click(function () {
        var isValid = formObj.form('validate');
        if (!isValid)
            return false;
        $(this).attr('disabled', 'disabled');
        $.simpleAjax(formObj, '${ctx}/perRole/save.do', {tableId: 'perRole_table'});
    });

    $('#perRole_reset_button').click(function () {
        formObj.reset();
    });
</script>
</body>
</html>